<!DOCTYPE html>
<!--suppress ThymeleafVariablesResolveInspection -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>场地收费标准页面</title>
    <link rel="stylesheet" th:href="@{../static/css/component.css}">
    <link rel="stylesheet" th:href="@{../static/css/admin.css}">
    <link rel="stylesheet" th:href="@{../static/css/font-awesome.min.css}">
    <script th:src="@{../static/js/JQuery2.1.4.js}"></script>
    <script th:src="@{../static/js/common.js}"></script>
    <script th:src="@{../static/js/vue.2.6.js}"></script>
    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="rbody" id="stander">
    <div class="top">
        当前位置：后台<i class="fa fa-fw fa-angle-right"></i>场地收费标准
    </div>
    <div class="main">
        <div class="container-fluid">
            <div class="col-sm-12" id="right">
                <div class="table-responsive">
                    <a data-toggle="modal" data-target="#login" style="float: right;font-size: 20px"><i class="fa fa-plus" aria-hidden="true"></i>制订收费标准</a>
                    <table class="table table-striped ">
                        <thead>
                            <tr>
                                <th>场地收费标准编号</th>
                                <th>场地类型</th>
                                <th>具体收费</th>
                                <th>场地收费制订人</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="(Placefeestander,index) in feestanders" :key="index">
                                <td>{{Placefeestander.feestander_id}}</td>
                                <td>{{Placefeestander.place_type}}</td>
                                <td>{{Placefeestander.money}}</td>
                                <td>{{Placefeestander.stander_maker}}</td>
                                <td>
                                    <div class="btn-group">
                                        <a @click="deletePlaceFeeStander(Placefeestander.feestander_id,index)" style="font-size: 16px"><i class="fa fa-times" aria-hidden="true"></i>删除</a>
                                        &nbsp;&nbsp;<a data-toggle="modal" :data-target="gernerateId1(index)" style="font-size: 16px"><i class="fa fa-pencil" aria-hidden="true"></i>修改</a>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>

    <div v-for="(Placefeestander,index) in feestanders" :id="gernerateId(index)" class="modal fade">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-body">
                    <button class="close" data-dismiss="modal">
                        <span>×</span>
                    </button>
                </div>
                <div class="modal-title">
                    <h1 class="text-center">修改场地收费标准</h1>
                </div>
                <div class="modal-body">
                    <form class="form-group" :id="'form'+index" :action="'/updatePlaceFeeStander?id='+Placefeestander.feestander_id" method="post">
                        <div class="form-group">
                            <label>场地类型</label>
                            <input name="place_type" :value="Placefeestander.place_type"  class="form-control" type="text" disabled>
                        </div>
                        <div class="form-group">
                            <label>收费标准</label>
                            <input name="money" :value="Placefeestander.money" class="form-control" type="number">
                        </div>
                    </form>
                    <div class="text-right">
                        <button class="btn btn-primary" type="submit" :form="'form'+index">确定</button>
                        <button class="btn btn-danger" data-dismiss="modal">取消</button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="login" class="modal fade">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-body">
                    <button class="close" data-dismiss="modal">
                        <span>×</span>
                    </button>
                </div>
                <div class="modal-title">
                    <h1 class="text-center">新增场地收费标准</h1>
                </div>
                <div class="modal-body">
                    <form class="form-group" id="form1" action="/addPlaceFeeStander" method="post" @submit="checkPlaceFee">
                        <div class="form-group">
                            <label>场地类型</label>
                            <input name="place_type" v-model="placefee" class="form-control" type="text">
                            <div class="invalid-feedback" id="no_err" style="color: red">{{message}}</div>
                        </div>
                        <div class="form-group">
                            <label>收费标准</label>
                            <input name="money" class="form-control" type="number">
                        </div>
                        <div class="text-right">
                            <button class="btn btn-primary" type="submit">确定</button>
                            <button class="btn btn-danger" data-dismiss="modal">取消</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script th:src="@{../static/js/placestander.js}"></script>
</body>
</html>